import request from '@/config/axios'
/**
 * 分页查询办公用房
 */
export const pageQuery = (params) => {
  return request.get({ url: '/office/space/page-query', params })
}

/**
 * 新增办公用房
 */
export const create = (data) => {
  return request.post({ url: '/office/space/create', data })
}

/**
 * 更新办公用房
 */
export const update = (data) => {
  return request.put({ url: '/office/space/update', data })
}

/**
 * 获取单个办公用房
 */
export const singleGet = (id) => {
  return request.get({ url: '/office/space/single-get?id=' + id })
}

/**
 * 根据buildingId获取办公楼层
 */
export const simpleFloorGet = (id) => {
  return request.get({ url: '/office/space/simple-floor-get?id=' + id })
}

/**
 * 获取按办公室类型聚合的信息
 */
export const getGroupTypeInfo = () => {
  return request.get({ url: '/office/space/get-group-type-info' })
}
